import time

from app.modules.apps.container_tomcat import TomcatMultiWarApp, TomcatApp
from app.modules.common import network

tomcat = TomcatApp(app_id='gzidc:ups2',
                   app_name='ups2',
                   zone_home_path='/usr/local/app/uc.gzidc.area',
                   zone_alias='gzidc',
                   port='3180',
                   nas_app_package_path='/mnt/winitRelease/latest.product/ups2',
                   )

tomcat.stop()
tomcat.uninstall_app()
tomcat.install_app()
tomcat.restart()
print tomcat.is_started()

time.sleep(3)
print tomcat.is_started()
time.sleep(3)
#tomcat.stop()
print tomcat.is_started()
